package com.hl.toolkit.server.tycoin.user.slaveservice;

import com.tycoin.common.repository.AbstractRepository;
import com.tycoin.common.service.AbstractService;
import com.tycoin.user.slaveentity.TycoinUserBank;
import com.tycoin.user.slaverepository.TycoinUserBankRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(value = "slaveTransactionManager", readOnly = true)
public class TycoinUserBankService   extends AbstractService<TycoinUserBank, Long> {

	@Autowired
	private TycoinUserBankRepository tycoinUserBankRepository;
	
	
	@Override
	public AbstractRepository<TycoinUserBank, Long> getRepository() {
 		return tycoinUserBankRepository;
	}


	public TycoinUserBank findOneBycardNo(String cardNo) {
		return tycoinUserBankRepository.findOneBycardNo(cardNo);
	}


	public List<TycoinUserBank> findByUserIdAll(String userId) {
		// TODO Auto-generated method stub
		return tycoinUserBankRepository.findByUserIdAll(userId);
	}


 
	
	
	
	

}
